package com.ruoyi.bizsys.mapper;

import java.util.List;
import java.util.Map;

import com.ruoyi.bizsys.domain.ApplyContacts;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

/**
 * 通讯录授权Mapper接口
 *
 * @author african-loan
 * @date 2021-10-28
 */
public interface ApplyContactsMapper extends BaseMapper<ApplyContacts>{
    List<ApplyContacts> getByCustNoAndApplyNo(@Param("custNo")String custNo, @Param("applyNo") String applyNo, @Param("tableName")String tableName);

    Integer batchSaveContacts(@Param("contactsList") List<ApplyContacts> contactsList,@Param("tableName") String newTableName);

    void createTable(String str);

    Integer getCount(String tableName);

    List<ApplyContacts> getClearData(String tableName);

    void updateGroupConcatMaxLen();

    void batchSaveContactsByMap(@Param("stringApplyContactsMap") Map<String, ApplyContacts> stringApplyContactsMap,@Param("tableName")String tableName);

    List<ApplyContacts> getByIds(@Param("tableName") String tableName,@Param("idList") List<String> idList);

    void deleteByIds(@Param("tableName")String tableName,@Param("idList")List<String> idList);

    int getCntContactsNum(@Param("tableName")String tableNameByCustNo,@Param("applyNo") String applyNo,@Param("custNo") String custNo);

    int familycontactInContact(@Param("tableName")String tableName,@Param("custNo") String custNo,@Param("contactPhone") String contactPhone);

    String getAllcontacthaschina(@Param("tableName")String tableName,@Param("custNo") String custNo);

    void updateApplyNo(@Param("tableName")String tableName,@Param("idList") List<String> useList);

    String get7DaysContactsCount(@Param("tableName")String tableName,@Param("custNo") String custNo);

    int selectContactsCount(@Param("userId") String userId, @Param("applyNo") String applyNo,@Param("tableName") String tableName);

    void syncExcludePhone(@Param("tableName")String tableName);

    List<ApplyContacts> getCollectionPhone(@Param("tableName")String tableName,@Param("userId") String userId,@Param("size") int size);
}
